import { calDistance } from '../../utils/LocationUtils'
const chooseLocationPlugin = requirePlugin('chooseLocation');
const MAPKEY ='EGQBZ-NS7WP-IJZDZ-L653M-2NCDE-2BB22';//使用在腾讯位置服务申请的key
const app = getApp();
Page({
  data: {
    h:0,
    cardCur: 0,
    location: app.globalData.location,
    swiperList: [{
      id: 0,
      type: 'image',
      url: 'https://7374-storagetime-q9ro8-1301937401.tcb.qcloud.la/lunbo1.png?sign=c3a63e33302a99904ac01c4b12f17f8b&t=1588401755'
    }, {
      id: 1,
        type: 'image',
        url: 'https://7374-storagetime-q9ro8-1301937401.tcb.qcloud.la/lunbo2.png?sign=d369633e03f71a83f3fc1cf94d51fdd0&t=1588401787',
    }, {
      id: 2,
      type: 'image',
      url: 'https://7374-storagetime-q9ro8-1301937401.tcb.qcloud.la/lunbo3.png?sign=83ab3c1e97288b84e2f55f6cf1cbc4a9&t=1588401807'
    }, {
      id: 3,
      type: 'image',
      url: 'https://7374-storagetime-q9ro8-1301937401.tcb.qcloud.la/lunbo4.png?sign=544f67ac6bc5299583761f72f9be7419&t=1588401825'
    }, {
      id: 4,
      type: 'image',
      url: 'https://7374-storagetime-q9ro8-1301937401.tcb.qcloud.la/lunbo5.png?sign=d9b5b305d350f578c218c2911a5c8f11&t=1588401849'
    }],

    text: '存时宝项目还在开发中，如有何任何疑问，请联系客服哦。',
    speedValue:30
  },
  onLoad() {
    // this.getLocation();
    wx.getSystemInfo({
      success: function(res) {
        let h = 750 * res.windowHeight/res.windowWidth - 500
         console.log(h);
      }
    })
  },

  onShow(){
  
  },

  DotStyle(e) {
    this.setData({
      DotStyle: e.detail.value
    })
  },
  // cardSwiper
  cardSwiper(e) {
    this.setData({
      cardCur: e.detail.current
     
    })  
   
  },
  gofamily:function(){
    wx.showToast({
      title: '此功能暂未开放',
      icon: 'none',
      duration: 2000
  
    })
    // wx.navigateTo({
    //   url: '/pages/register/newuser',
    // })
  },

  goGallery:function(){
 
    wx.navigateTo({
      url: '/pages/gallery/gallery',
    })
  }
  
})